package com.hwy.chart.cursor

import android.graphics.Canvas
import android.graphics.RectF
import com.hwy.chart.BaseChartView

/**
 * =======================================
 * 作者: hewenyu
 * 日期: 2022/5/10 16:29
 * 说明: 光标的应用对象
 * =======================================
 */
open class SimpleCursor(chartView: BaseChartView) : BaseCursor(chartView) {

    override fun drawVerticalCursorTag(canvas: Canvas, bounds: RectF, x: Float) {
        // 纵向的光标Tag绘制在光标底部
        cursorTag.draw(canvas, x, bounds.bottom, CursorTag.VERTICAL)
    }

    override fun drawHorizontalCursorTag(canvas: Canvas, bounds: RectF, y: Float) {
        // 横向光标Tag绘制在光标右侧
        cursorTag.draw(canvas, bounds.right, y, CursorTag.HORIZONTAL)
    }

}